import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@v/Home.vue'
import barChartsRouter from './module/bar_charts';
import lineChartsRouter from './module/line_charts';
import ponintChartsRouter from './module/point_charts';
import areaChartsRouter from './module/area_charts';
import pieChartsRouter from './module/pie_charts';
import radarChartsRouter from './module/radar_charts';
import funnelChartsRouter from './module/funnel_charts';
import blockChartsRouter from './module/block_charts';
import boxChartsRouter from './module/box_charts';
import candleChartsRouter from './module/candle_charts';
import mapChartsRouter from './module/map_charts';
import facetChartsRouter from './module/facet_charts';
import relationalChartsRouter from './module/relational_charts';
import customChartsRouter from './module/custom_charts';

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect:{ name: 'line_basic' },
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@v/404'),
  },
  barChartsRouter,
  lineChartsRouter,
  ponintChartsRouter,
  areaChartsRouter,
  pieChartsRouter,
  radarChartsRouter,
  funnelChartsRouter,
  blockChartsRouter,
  boxChartsRouter,
  candleChartsRouter,
  mapChartsRouter,
  facetChartsRouter,
  relationalChartsRouter,
  customChartsRouter,
 {
   path:"*",
   redirect:"/404"
 }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
